/**
 * Created by Administrator on 2017/5/16.
 */
import { Component } from '@angular/core';
@Component({
    selector: 'click-me',
    template: `        
    <button (click)="onClickMe()">点我</button>
    {{clickMessage}}
  `
})
/*
* (click)表示button标签绑定点击事件
* */
export class ClickMeComponent {
    clickMessage = '';
    onClickMe(){
        this.clickMessage = 'Hello Angualr 2!';
    }
}